<!DOCTYPE html>
<html lang="pt-br" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>

	<h:outputStylesheet name="bootstrap.min.css" library="css"></h:outputStylesheet>
	<h:outputStylesheet name="bootstrap-responsive.min.css" library="css"></h:outputStylesheet>
	<h:outputStylesheet name="font-awesome.min.css" library="css"></h:outputStylesheet>
	<h:outputStylesheet name="login.css" library="css"></h:outputStylesheet>

	<link rel="shortcut icon"
		href="#{facesContext.externalContext.requestContextPath}/resources/icon.ico"></link>
	<title>Game Login</title>
	<meta charset="utf-8" />

</h:head>

<h:body>

	<header>
		<div class="header">
			<div class="container">
				<div class="row">
					<div class="span4">
						<h2>Empreendedorismo</h2>
					</div>
				</div>
			</div>
		</div>
	</header>
	<div class="container">
		<p:messages id="messages" showDetail="false" autoUpdate="true"
			closable="false" />
		<h:form>
			<h3>Efetue seu login</h3>
			<h:panelGrid columns="2">
				<h:outputLabel value="Login" for="login" />
				<h:inputText class="form-control" value="#{loginBean.login}"
					id="login" required="true"
					requiredMessage="O campo login deve ser preenchido" />
				<h:outputLabel value="Senha" for="senha" />
				<h:inputSecret class="form-control"
					value="#{loginBean.usuario.senha}" id="senha" required="true"
					requiredMessage="O campo senha deve ser preenchido" />
			</h:panelGrid>
			<h:commandButton class="btn btn-primary" value="Entrar"
				action="#{loginBean.fazerLogin}" />
			<!-- <h5>
				Esqueceu sua senha <a href="#">clique aqui</a>
			</h5> -->
			<h5>
				Ainda não possui cadastro <a href="#" onclick="dlg.show()">clique
					aqui</a>
			</h5>
		</h:form>
	</div>

	<p:dialog header="Cadastro" widgetVar="dlg" modal="true" width="400"
		resizable="false">
		<h:form>


			<h:panelGrid columns="2">
				<h:outputLabel value="Nome" for="nome" />
				<h:inputText id="nome" value="#{alunoBean.aluno.nome}"
					required="true" requiredMessage="O campo aluno deve ser preenchido" />
				<h:outputLabel value="Matricula" for="matricula" />
				<h:inputText id="matricula" value="#{alunoBean.aluno.login}"
					required="true"
					requiredMessage="O campo matricula deve ser preenchido" />
				<h:outputLabel value="Senha" for="senha" />
				<h:inputSecret id="senha" value="#{alunoBean.aluno.senha}"
					required="true" requiredMessage="O campo senha deve ser preenchido" />
				<h:outputLabel value="E-mail" for="email" />
				<h:inputText id="email" value="#{alunoBean.aluno.email}"
					required="true" requiredMessage="O campo email deve ser preenchido" />
			</h:panelGrid>
			<h:commandButton class="btn btn-primary" value="Cadastrar"
				action="#{alunoBean.cadastrarAluno}" />

		</h:form>
	</p:dialog>

</h:body>

</html>